# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-sys-virt
pkgver=9.0.0
pkgrel=1
pkgdesc="Represent and manage a libvirt hypervisor connection"
arch=('loong64' 'x86_64')
license=('PerlArtistic')
url="https://metacpan.org/release/Sys-Virt"
depends=('libvirt' 'perl')
makedepends=('perl-cpan-changes' 'perl-module-build' 'perl-xml-xpath' 'perl-test-pod'
             'perl-test-pod-coverage')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/D/DA/DANBERR/Sys-Virt-v$pkgver.tar.gz")
sha512sums=('c84e401ec2237e94fab7b0b2a68451d96e06c5db59c4e944330530fac5ca9a0e4e510760cfbd85755d5bd2e860f450f7baf190a289cdd77bfcb0b8a6a4e0b225')

build() {
  cd Sys-Virt-v$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Sys-Virt-v$pkgver
  make test
}

package() {
  cd Sys-Virt-v$pkgver
  make DESTDIR="$pkgdir" install
}
